Integrand size = 15, antiderivative size = 39 \[ \int \frac {\cos ^2(x)}{a+b \sin ^2(x)} \, dx=-\frac {x}{b}+\frac {\sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{\sqrt {a} b} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {3270, 400, 209, 211} \[ \int \frac {\cos ^2(x)}{a+b \sin ^2(x)} \, dx=\frac {\sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{\sqrt {a} b}-\frac {x}{b} \]
[In]
[Out]
Rule 209
Rule 211
Rule 400
Rule 3270
Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \left (a+(a+b) x^2\right )} \, dx,x,\tan (x)\right ) \\ & = -\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (x)\right )}{b}+\frac {(a+b) \text {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\tan (x)\right )}{b} \\ & = -\frac {x}{b}+\frac {\sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{\sqrt {a} b} \\ \end{align*}
Time = 0.09 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00 \[ \int \frac {\cos ^2(x)}{a+b \sin ^2(x)} \, dx=-\frac {x}{b}+\frac {\sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{\sqrt {a} b} \]
[In]
[Out]
Time = 0.35 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.97
method | result | size |
default | \(-\frac {\arctan \left (\tan \left (x \right )\right )}{b}+\frac {\left (a +b \right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (x \right )}{\sqrt {a \left (a +b \right )}}\right )}{b \sqrt {a \left (a +b \right )}}\) | \(38\) |
risch | \(-\frac {x}{b}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right )}{2 a b}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right )}{2 a b}\) | \(97\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 206, normalized size of antiderivative = 5.28 \[ \int \frac {\cos ^2(x)}{a+b \sin ^2(x)} \, dx=\left [\frac {\sqrt {-\frac {a + b}{a}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (x\right )^{2} - 4 \, {\left ({\left (2 \, a^{2} + a b\right )} \cos \left (x\right )^{3} - {\left (a^{2} + a b\right )} \cos \left (x\right )\right )} \sqrt {-\frac {a + b}{a}} \sin \left (x\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (x\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (x\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right ) - 4 \, x}{4 \, b}, -\frac {\sqrt {\frac {a + b}{a}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a - b\right )} \sqrt {\frac {a + b}{a}}}{2 \, {\left (a + b\right )} \cos \left (x\right ) \sin \left (x\right )}\right ) + 2 \, x}{2 \, b}\right ] \]
[In]
[Out]
Timed out. \[ \int \frac {\cos ^2(x)}{a+b \sin ^2(x)} \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.36 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.90 \[ \int \frac {\cos ^2(x)}{a+b \sin ^2(x)} \, dx=\frac {{\left (a + b\right )} \arctan \left (\frac {{\left (a + b\right )} \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b} - \frac {x}{b} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.59 \[ \int \frac {\cos ^2(x)}{a+b \sin ^2(x)} \, dx=\frac {{\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (x\right ) + b \tan \left (x\right )}{\sqrt {a^{2} + a b}}\right )\right )} {\left (a + b\right )}}{\sqrt {a^{2} + a b} b} - \frac {x}{b} \]
[In]
[Out]
Time = 14.02 (sec) , antiderivative size = 272, normalized size of antiderivative = 6.97 \[ \int \frac {\cos ^2(x)}{a+b \sin ^2(x)} \, dx=-\frac {\mathrm {atan}\left (\frac {2\,a^2\,\mathrm {tan}\left (x\right )}{2\,a^2+4\,a\,b+2\,b^2}+\frac {2\,b^2\,\mathrm {tan}\left (x\right )}{2\,a^2+4\,a\,b+2\,b^2}+\frac {4\,a\,b\,\mathrm {tan}\left (x\right )}{2\,a^2+4\,a\,b+2\,b^2}\right )}{b}-\frac {\mathrm {atanh}\left (\frac {6\,b^2\,\mathrm {tan}\left (x\right )\,\sqrt {-a^2-b\,a}}{2\,a^3+6\,a^2\,b+6\,a\,b^2+2\,b^3}+\frac {2\,a\,\mathrm {tan}\left (x\right )\,\sqrt {-a^2-b\,a}}{6\,a\,b+2\,a^2+6\,b^2+\frac {2\,b^3}{a}}+\frac {6\,b\,\mathrm {tan}\left (x\right )\,\sqrt {-a^2-b\,a}}{6\,a\,b+2\,a^2+6\,b^2+\frac {2\,b^3}{a}}+\frac {2\,b^3\,\mathrm {tan}\left (x\right )\,\sqrt {-a^2-b\,a}}{2\,a^4+6\,a^3\,b+6\,a^2\,b^2+2\,a\,b^3}\right )\,\sqrt {-a\,\left (a+b\right )}}{a\,b} \]
[In]
[Out]